﻿@using DirectSell.Model.User
@model UserInforMationDetails
@{
    ViewBag.Title = "Index";
    Layout = "~/Areas/Manager/Views/Shared/ManagerLayout.cshtml";
}
<style type="text/css">
    table.t_info {
        width: 150px;
        background: #292731;
        border-collapse: collapse;
    }

        table.t_info th {
            color: #FFF;
            text-align: center;
            height: 30px;
            line-height: 30px;
            border: 1px solid #292731;
        }

            table.t_info th a {
                color: #FFF;
            }

        table.t_info ._span {
            color: #F00;
            cursor: pointer;
        }

            table.t_info ._span:hover {
                text-decoration: underline;
            }

        table.t_info td {
            font-size: 13px;
            height: 20px;
            background: #C9AA6E;
            text-align: center;
            border: 0.1rem dotted #B78E44;
        }

        table.t_info tr td {
            font-size: 10px;
        }
</style>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 用户中心 <span class="c-gray en">&gt;</span> 用户管理 
    <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="#" onclick='$("#searchForm").submit();' title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
    @using (Ajax.BeginForm("Index", new RouteValueDictionary { { "id", "" } }, new AjaxOptions { UpdateTargetId = "articles", InsertionMode = InsertionMode.Replace }, new RouteValueDictionary { { "id", "searchForm" } }))
    {
        <div class="text-c">
            <input type="text" class="input-text"  style="width:250px" placeholder="输入会员编号" id="usercode" name="SerachCondition">
            <button type="button" class="btn btn-success radius" id="sel"><i class="Hui-iconfont">&#xe665;</i> 搜用户</button>
            <a onclick="GoBack();" href="#" class="btn btn-blue">返回上一层</a>
        </div>
    }
    <div class="mt-20" style="text-align:center">
        <div id="dvCategoryResults">
          @Html.Partial("List", Model)
        </div>
    </div>
</div>
<script>
        $('#sel').on('click', function () {
            var code = $('#usercode').val();
            if(code.trim()!=null&&code.trim()!=""){
                QueryMap(code);
            }
        })
        function QueryMap(code) {
            //加载层
            var index = layer.load(1, {
                shade: [0.1, '#fff']
            });
            $.ajax({
                    type: "post",
                    url: "/BackNetworkMap/IsExistence",
                    data: { code: code },
            }).success(function (message) {
                if (message != '成功') {
                    layer.msg('该会员编号不存在', { icon: 2 });
                }
                    $("#dvCategoryResults").load('@(Url.Action("List", "BackNetworkMap", null, Request.Url.Scheme))?code=' + code);
                }).fail(function (err) {
                    layer.msg('系统错误,请稍后重试', { icon: 2 });
                })
            layer.close(index)//关闭加载层
        }
        function Hopping(code) {
            //加载层
            var index = layer.load(1, {
                shade: [0.1, '#fff']
            });
            $("#dvCategoryResults").load('@(Url.Action("List", "BackNetworkMap", null, Request.Url.Scheme))?code=' + code);
            layer.close(index)//关闭加载层
        }

        function GoBack() {
            //加载层
            var index = layer.load(1, {
                shade: [0.1, '#fff']
            });
            var code = $('#td111').html();
            $.ajax({
                type: "post",
                url: "/BackNetworkMap/GoBack",
                data: { code: code },
            }).success(function (message) {
                if (message == "") {
                    layer.msg('已是最顶层',{ icon: 4 });
                }
                $("#dvCategoryResults").load('@(Url.Action("List", "BackNetworkMap", null, Request.Url.Scheme))?code=' + message);
            }).fail(function (err) {
                layer.msg('系统错误,请稍后重试', { icon: 2 });
            })
            layer.close(index)//关闭加载层
        }

</script>
